package com.sword.pay.bean.bo;

import com.sword.pay.bean.enums.PayMethodEnum;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * @description: 支付订单
 * @author：Lv.RJ
 * @version: 1.0.0
 * @create: 2025/02/18
 **/

public class PayOrder {
    /** 应用号 */
    private String appId;

    /** 商户订单号 */
    private String bizOrderNo;

    /** 订单号 */
    private String orderNo;

    /** 通道订单号 */
    private String outOrderNo;

    /** 标题 */
    private String title;

    /** 描述 */
    private String description;

    /** 是否支持分账 */
    private Boolean allocation;

    /** 自动分账 */
    private Boolean autoAllocation;

    /**
     * 支付通道, 以最后一次为准
     */
    private String channel;

    /**
     * 支付方式, 以最后一次为准
     */
    private PayMethodEnum method;

    /** 金额(元) */
    private BigDecimal amount;

    /** 可退金额(元) */
    private BigDecimal refundableBalance;

    /**
     * 支付状态
     */
    private String status;

    /**
     * 退款状态
     */
    private String refundStatus;

    /**
     * 分账状态
     */
    private String allocStatus;

    /** 过期时间 */
    private LocalDateTime expiredTime;

    /** 支付成功时间 */
    private LocalDateTime payTime;

    /** 关闭时间 */
    private LocalDateTime closeTime;

    /** 同步跳转地址, 以最后一次为准 */
    private String returnUrl;

    /** 异步通知地址,以最后一次为准 */
    private String notifyUrl;

    /**
     * 通道附加参数序列化为Json字符串 以最后一次为准
     */
    private String extraParam;

    /** 商户扩展参数,回调时会原样返回, 以最后一次为准 */
    private String attach;

    /** 请求时间 */
    private LocalDateTime reqTime;

    /** 支付终端ip 以最后一次为准 */
    private String clientIp;

    /** 错误码 */
    private String errorCode;

    /** 错误信息 */
    private String errorMsg;

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getBizOrderNo() {
        return bizOrderNo;
    }

    public void setBizOrderNo(String bizOrderNo) {
        this.bizOrderNo = bizOrderNo;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getOutOrderNo() {
        return outOrderNo;
    }

    public void setOutOrderNo(String outOrderNo) {
        this.outOrderNo = outOrderNo;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Boolean getAllocation() {
        return allocation;
    }

    public void setAllocation(Boolean allocation) {
        this.allocation = allocation;
    }

    public Boolean getAutoAllocation() {
        return autoAllocation;
    }

    public void setAutoAllocation(Boolean autoAllocation) {
        this.autoAllocation = autoAllocation;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public PayMethodEnum getMethod() {
        return method;
    }

    public void setMethod(PayMethodEnum method) {
        this.method = method;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public BigDecimal getRefundableBalance() {
        return refundableBalance;
    }

    public void setRefundableBalance(BigDecimal refundableBalance) {
        this.refundableBalance = refundableBalance;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getRefundStatus() {
        return refundStatus;
    }

    public void setRefundStatus(String refundStatus) {
        this.refundStatus = refundStatus;
    }

    public String getAllocStatus() {
        return allocStatus;
    }

    public void setAllocStatus(String allocStatus) {
        this.allocStatus = allocStatus;
    }

    public LocalDateTime getExpiredTime() {
        return expiredTime;
    }

    public void setExpiredTime(LocalDateTime expiredTime) {
        this.expiredTime = expiredTime;
    }

    public LocalDateTime getPayTime() {
        return payTime;
    }

    public void setPayTime(LocalDateTime payTime) {
        this.payTime = payTime;
    }

    public LocalDateTime getCloseTime() {
        return closeTime;
    }

    public void setCloseTime(LocalDateTime closeTime) {
        this.closeTime = closeTime;
    }

    public String getReturnUrl() {
        return returnUrl;
    }

    public void setReturnUrl(String returnUrl) {
        this.returnUrl = returnUrl;
    }

    public String getNotifyUrl() {
        return notifyUrl;
    }

    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }

    public String getExtraParam() {
        return extraParam;
    }

    public void setExtraParam(String extraParam) {
        this.extraParam = extraParam;
    }

    public String getAttach() {
        return attach;
    }

    public void setAttach(String attach) {
        this.attach = attach;
    }

    public LocalDateTime getReqTime() {
        return reqTime;
    }

    public void setReqTime(LocalDateTime reqTime) {
        this.reqTime = reqTime;
    }

    public String getClientIp() {
        return clientIp;
    }

    public void setClientIp(String clientIp) {
        this.clientIp = clientIp;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }
}
